<?php

/**
 * User class used to hold our user's information throughout a session
 * @author Cristian Asenjo on 03/12/2011
 */
class User {
    
    var $userID; //Internal user ID
    var $userType; // Superadmin, seller, buyer, etc
    var $userDescription; // What our user is
    var $username; // External username used to log in with the corresponding password
    var $lastConnected; // When did we last connect
    var $entryDate; // When the user was created
    var $emailAddress;
    
    // Basic constructor
    function __construct() {
        
    }
    
    // Gets and sets
    
    /**
     * Sets the userID for our user object
     * @param $userID Integer  The <b>internal</b> userID used by the system to log the user in
     */
    function setUserID($userID) {
        $this->userID = $userID;
    }
    
    /**
     * Gets the userID for our user object
     * @return Integer  The <b>internal</b> userID used by the system to log the user in
     */
    function getUserID() {
        return $this->userID;
    }
    
    /**
     * Sets the user type for our user object
     * @param $type Integer  The <b>internal</b> user type used by the system
     */    
    function setUserType($type) {
        $this->userType = $type;
    }
    
    /**
     * Gets the user type for our user object
     * @return Integer  The <b>internal</b> user type used by the system
     */
    function getUserType() {
        return $this->userType;
    }
    
     /**
     * Sets the user description for our user object
     * @param $description String  The description for what the user is
     */    
    function setUserDescription($description) {
        $this->userDescription = $description;
    }
    
     /**
     * Gets the user description for our user object
     * @return String  The description for what the user is
     */   
    function getUserDescription() {
        return $this->userDescription;
    }   
    
    /**
     * Sets the username for our user object
     * @param $username String  The userID used by the user to login
     */
    function setUsername($username) {
        $this->username = $username;
    }
    
    /**
     * Gets the username for our user object
     * @return String  The userID used by the user to login
     */    
    function getUsername() {
        return $this->username;
    }
    
    /**
     * Sets the last connected time for the user
     * @param $lastConnected Integer  The UNIX timestamp for when our user last connected 
     */
    function setLastConnected($lastConnected) {
        $this->lastConnected = $lastConnected;
    }
    
    /**
     * Gets the last connected time for the user
     * @return Integer  The UNIX timestamp for when our user last connected
     */
    function getLastConnected() {
        return $this->lastConnected;
    }
    
    /**
     * Sets the date of creation for the user
     * @param $entryDate Integer  The UNIX timestamp for when the user was first created 
     */
    function setEntryDate($entryDate) {
        $this->entryDate = $entryDate;
    }
    
    /**
     * Gets the date of creation for the user
     * @return Integer  The UNIX timestamp for when the user was first created
     */
    function getEntryDate() {
        return $this->entryDate;
    }
    
    /**
     * Sets the user's email address
     * @param $email String  The email address belonging to the user
     */
    function setEmailAddress($email) {
        $this->emailAddress = $email;
    }
    
    /**
     * Gets the user's email address
     * @return String  The email address belonging to the user
     */
    function getEmailAddress($email) {
        return $this->emailAddress;
    }


}
?>
